From 2c82f2a6efd342c61bff99db1eed5b1fddbb1454 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 25 Mar 2005 14:00:59 +0000 Subject: [PATCH] bitkeeper revision 1.1236.43.11 (4244199bhSeKA6aHwn5DYaLjeLwt9A) Remove unused function find_last_domain(). Signed-off-by: Keir Fraser --- xen/common/domain.c | 27 +++------------------------ xen/include/xen/sched.h | 3 --- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 09748b93a6..4cf1da4a09 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -41,7 +41,6 @@ struct domain *do_createdomain(domid_t dom_id, unsigned int cpu) d->id = dom_id; ed->processor = cpu; - d->create_time = NOW(); spin_lock_init(&d->time_lock); @@ -107,28 +106,6 @@ struct domain *find_domain_by_id(domid_t dom) } -/* Return the most recently created domain. */ -struct domain *find_last_domain(void) -{ - struct domain *d, *dlast; - - read_lock(&domlist_lock); - dlast = domain_list; - d = dlast->next_list; - while ( d != NULL ) - { - if ( d->create_time > dlast->create_time ) - dlast = d; - d = d->next_list; - } - if ( !get_domain(dlast) ) - dlast = NULL; - read_unlock(&domlist_lock); - - return dlast; -} - - #ifndef CONFIG_IA64 extern void physdev_destroy_state(struct domain *d); #else @@ -207,6 +184,7 @@ void domain_shutdown(u8 reason) raise_softirq(SCHEDULE_SOFTIRQ); } + unsigned int alloc_new_dom_mem(struct domain *d, unsigned int kbytes) { unsigned int alloc_pfns, nr_pages; @@ -349,7 +327,8 @@ long do_boot_vcpu(unsigned long vcpu, full_execution_context_t *ctxt) sched_add_domain(ed); - if ( (rc = arch_set_info_guest(ed, c)) != 0 ) { + if ( (rc = arch_set_info_guest(ed, c)) != 0 ) + { sched_rem_domain(ed); goto out; } diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index de13d2d7fe..3098586f17 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -97,7 +97,6 @@ struct exec_domain struct domain { domid_t id; - s_time_t create_time; shared_info_t *shared_info; /* shared data area */ spinlock_t time_lock; @@ -215,7 +214,6 @@ extern int construct_dom0( extern int set_info_guest(struct domain *d, dom0_setdomaininfo_t *); struct domain *find_domain_by_id(domid_t dom); -struct domain *find_last_domain(void); extern void domain_destruct(struct domain *d); extern void domain_kill(struct domain *d); extern void domain_shutdown(u8 reason); @@ -401,7 +399,6 @@ static inline void domain_unpause_by_systemcontroller(struct domain *d) #include #include - #endif /* __SCHED_H__ */ /* -- 2.30.2